package com.cis.fingerprint.controller;


import com.cis.fingerprint.core.SerialPortManager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;


@Controller
public class IndexController {

    @Autowired
    SerialPortManager serialPortManager;


    @GetMapping({"/index","/"})
    public String index(ModelMap mmap){
        List<String> portsName = serialPortManager.getPortsName();
        mmap.put("portsName",portsName);
        return "index";
    }

}
